/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.cspimp.psp.domain;

import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import javax.validation.constraints.*;
import javax.persistence.Entity;
import javax.persistence.Table;

import me.zhengjie.base.BaseCspImpEntity;
import me.zhengjie.base.BaseEntity;
import org.hibernate.annotations.*;
import java.sql.Timestamp;
import java.io.Serializable;

/**
* @website https://docs.auauz.net
* @description /
* @author zmm
* @date 2020-05-30
**/
@Entity
@Data
@Table(name="psp_om_base_info")
public class OmBaseInfo extends BaseCspImpEntity implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    @ApiModelProperty(value = "id")
    private Long id;



    @Column(name = "name",nullable = false)
    @NotBlank
    @ApiModelProperty(value = "组织名称")
    private String name;

    @Column(name = "business_license")
    @ApiModelProperty(value = "营业执照")
    private String businessLicense;

    @Column(name = "industry")
    @ApiModelProperty(value = "行业")
    private String industry;

    @Column(name = "legal")
    @ApiModelProperty(value = "法人代表")
    private String legal;

    @Column(name = "area")
    @ApiModelProperty(value = "所属区域")
    private String area;

    @Column(name = "nature")
    @ApiModelProperty(value = "性质")
    private String nature;

    @Column(name = "scale")
    @ApiModelProperty(value = "规模")
    private String scale;

    @Column(name = "contact_person")
    @ApiModelProperty(value = "联系人")
    private String contactPerson;

    @Column(name = "contact_phone")
    @ApiModelProperty(value = "联系手机")
    private String contactPhone;

    @Column(name = "contact_job")
    @ApiModelProperty(value = "联系职务")
    private String contactJob;

    @Column(name = "contact_email")
    @ApiModelProperty(value = "联系电邮")
    private String contactEmail;

    @Column(name = "contact_fax")
    @ApiModelProperty(value = "联系传真")
    private String contactFax;

    @Column(name = "contact_tel")
    @ApiModelProperty(value = "联系固话")
    private String contactTel;

    @Column(name = "reg_date")
    @ApiModelProperty(value = "登记时间")
    private String regDate;


    public void copy(OmBaseInfo source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}